//系统管理
import {
    get,
    post
} from '../utils/request'
import {
    BACKEND_ROOT
} from '../Constants'
// 获取文件夹内所有文件的信息
export const getFileList = function (params) {
    return get('/group/file/ls', params)
}
// 根据name查询文件
export const getSearchFile = function (params) {
    return get('/group/file/search', params)
}
// 上传文件
export const getUploadFile = function (params) {
    return get('/group/file/upload', params)
}
// 获取文件夹内所有带有视频信息的文件的信息
export const getVideoList = function (params) {
    return get('/group/video/ls', params)
}
//分页查询用户
export const getUserByPage = function (params) {
    return get('/group/user/getUserByPage', params)
}
//添加用户信息
export const addUser = function (params) {
    return post('/group/user/addUser', params)
}

//分页查询角色
export const getRoleByPage = function (params) {
    return get('/group/role/getRoleByPage', params)
}
// 角色查询尾矿库列表
export const getTailingPondList = function (params) {
    return get('/group/role/getTailingPondList', params)
}
// 角色查询企业列表
export const getUnitNameList = function (params) {
    return get('/group/role/getUnitNameList', params)
}

// 查询权限数据
export const getRoleAuthorizations = function (params) {
    return get('/group/role/queryRoleAuthorizations', params)
}
// 为角色绑定权限
export const bindRoleAuthorization = function (data) {
    return post('/group/role/bindRoleAuthorization', data)
}
// 查询角色名称列表
export const getRoleNameList = function (params) {
    return get('/group/role/getRoleNameList', params)
}
// 查询尾矿库分页
export const getTailingPondInforByPage = function (params) {
    return get('/group/tailingPond/getTailingPondByPage', params)
}
// 查询尾矿库类型列表
export const getTailingTypeList = function (params) {
    return get('/group/tailingPond/getTailingTypeList', params)
}
// 查询城市列表
export const getAreaTreeList = function (params) {
    return get('group/areaCode/getAreaTreeList', params)
}
// 查询企业列表
export const getUnitInfoList = function (params) {
    return get('/group/enterpriseInformationManagement/getUnitInfoList', params)
}
// 查询尾矿库等级列表
export const getTailingPondLevelList = function (params) {
    return get('/group/TailingPondLevel/getTailingPondLevelList', params)
}
// 查询行业列表
export const getIndustryTypeList = function (params) {
    return get('/group/tailingPond/getIndustryTypeList', params)
}
// 查询矿种列表
export const getMineralsSpeciesList = function (params) {
    return get('/group/tailingPond/getMineralsSpeciesList', params)
}
// 查询运行状况列表
export const getOperatingStatusList = function (params) {
    return get('/group/tailingPond/getOperatingStatusList', params)
}
// 分页查询企业信息
export const getEnterpriseInfoListPage = function (params) {
    return get('/group/enterpriseInformationManagement/getEnterpriseInfoListPage', params)
}
// 查询企业性质类型
export const getEnterpriseNatureAll = function (params) {
    return get('/group/enterpriseInformationManagement/getEnterpriseNatureAll', params)
}
// 查询所属行业类型
export const getIndustryInvolvedAll = function (params) {
    return get('/group/enterpriseInformationManagement/getIndustryInvolvedAll', params)
}
// 查询企业拥有的权限
export const getUnitAuthorizations = function (params) {
    return get('/group/enterpriseInformationManagement/getUnitAuthorizations', params)
}
// 绑定企业权限
export const bindUnitAuthorizations = function (data) {
    return post('/group/enterpriseInformationManagement/bindUnitAuthorizations', data)
}

// 删除企业信息
export const delEnterpriseInformationByUnitId = function (params) {
    return post('/group/enterpriseInformationManagement/delEnterpriseInformationByUnitId', params)
}
// 根据企业id和文件夹的unique-name获得对应的文件夹id
export const getDirectoryId = function (uniqueName, params) {
    return get("/group/file/directory/" + uniqueName, params)
}
// 根据企业id和文件夹的unique-name获得对应的文件夹id
export const getDirectoryIdList = function (uniqueName, params) {
    return get("/group/file/getDirectoryByuniqueName/" + uniqueName, params)
}
// 分页查询企业端信息
export const getUnitPlatformByPage = function (params) {
    return get("/group/unitPlatform/selectUnitPlatformByPage", params)
}
//添加企业端信息
export const addtUnitPlatform = function (params) {
    return post('/group/unitPlatform/insertUnitPlatform', params)
}
//查询可新增的字段
export const selectIncreasableUnitInfo = function (params) {
    return get('/group/unitPlatform/selectIncreasableUnitInfo', params)
}
//查询可新增的字段
export const deleteUnitPlatform = function (params) {
    return get('/group/unitPlatform/deleteUnitPlatform', params)
}
//新增图片
export const imageUpload = function (params) {
    return post('/group/unitPlatformImage/imageUpload', params)
}
export const uploadUrl = BACKEND_ROOT
// export const uploadUrl = 'http://10.200.1.2:8080/enterprise'
// 图片调用
export const imgUrl = BACKEND_ROOT + '/group/unitPlatformImage/image/view?imageId='
// export const imgUrl = 'http://10.200.1.2:8080/enterprise/group/unitPlatformImage/image/view?imageId='

// 图片调用
export const imgRiskUrl = BACKEND_ROOT + '/group/tailingPondRiskLevelImageHandle/image/view?imageId='
// 根据尾矿库id,查出四个风险等级图,做展示用
export const getRiskLevelImage = function (params) {
    return get('/group/tailingPondRiskLevelImage/getRiskLevelImageByTailingPondId', params)
}